package com.tledu.service.impl;

import com.tledu.dao.EmployeeDao;
import com.tledu.model.Employee;
import com.tledu.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeDao employeeDao;

    @Override
    public List<Employee> list() {
        return employeeDao.list();
    }

    @Override
    public int insert(Employee employee) {
        return employeeDao.insert(employee);
    }

    @Override
    public int delete(String empId) {
        return employeeDao.delete(empId);
    }

    @Override
    public int update(Employee employee) {
        return employeeDao.update(employee);
    }

    @Override
    public Employee selectById(String empId) {
        return employeeDao.selectById(empId);
    }
}
